package com.powersystem.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.powersystem.demo.entity.Flawlog;
import com.powersystem.demo.mapper.FlawlogMapper;
import com.powersystem.demo.service.IFlawlogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author linrongji
 * @since 2019-11-21
 */
@Service
public class FlawlogServiceImpl extends ServiceImpl<FlawlogMapper, Flawlog> implements IFlawlogService {

    @Autowired
    private FlawlogMapper flawlogMapper;

    public IPage<Flawlog> selectPageVo(String lineCode,int isStart,int page){
        Page<Flawlog> pages = new Page<>(page, 5);
        return  flawlogMapper.selectPage(pages, new QueryWrapper<Flawlog>()
                .like("lineCode", lineCode).like("isStart", isStart));
    }
}
